//
//  NegotiationHistoryCell.m
//  ZSYH
//
//  Created by 主事丫环HU on 2020/6/12.
//  Copyright © 2020 魏堰青. All rights reserved.
//
// 师傅的回复历史
#import "WorkerHistoryCell.h"
@interface WorkerHistoryCell()
@property (weak, nonatomic) IBOutlet UILabel *timeLabel;
@property (weak, nonatomic) IBOutlet UILabel *greenContentLabel;
@property (weak, nonatomic) IBOutlet UIImageView *lineImageView;

@end
@implementation WorkerHistoryCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}
+ (instancetype)cellWithTableView:(UITableView *)tableView {
    
    static NSString *ID = @"WorkerHistoryCell";
    
    WorkerHistoryCell *cell = [tableView dequeueReusableCellWithIdentifier:ID];
    if (cell == nil) {
        
        cell = [NSBundle.mainBundle loadNibNamed:NSStringFromClass([self class]) owner:nil options:nil].firstObject;
    }
    cell.selectionStyle = UITableViewCellSelectionStyleNone;
    return cell;
}
- (void)setModel:(NegotiationHistoryModel *)model{
    self.timeLabel.text = model.createTime;
    if ([model.state isEqualToString:@"0"]) {
        self.greenContentLabel.text = @"师傅发起申请";
    } else if ([model.state isEqualToString:@"3"]){
        self.greenContentLabel.text = @"师傅开始回寄";
    } else if ([model.state isEqualToString:@"4"]){
        self.greenContentLabel.text = @"师傅取消回寄";
    }
    if (model.isLast == YES) {
        self.lineImageView.hidden = YES;
    }
    
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
